
package com.wydstation.power.properties.dto.station;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.data.annotation.Id;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

@Data
public class StationInfoDTO implements Serializable {

    private Long stationId;

    @Data
    public static class StationInfo {
        @Id
        private Long stationId;//int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
        private String stationName;//varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '电站名称',
        private Integer stationType;// tinyint(1) NOT NULL COMMENT '电站类型（2：风电，1：光伏）',
        private Integer enterpriseId;//int(4) NOT NULL COMMENT '企业编码',
        private BigDecimal capacity;//decimal(10,4) NOT NULL COMMENT '装机容量',
        private Integer unitCount;//int(11) NOT NULL COMMENT '装机台数',
        private Integer addressId;//int(11) NOT NULL COMMENT '地址id',
        private Integer isConnected;//tinyint(1) NOT NULL COMMENT '是否接入（0未接入，1已接入）',
        private BigDecimal longitude;//decimal(18,0) NOT NULL DEFAULT '-1' COMMENT '经度  (暂时为空)',
        private BigDecimal latitude;//decimal(18,0) DEFAULT '-1' COMMENT '纬度  (暂时为空)',
        private Integer timeZone;// tinyint(3) DEFAULT NULL COMMENT '电站所在时区',
        private Integer dispatchingAgencyType;// int(10) DEFAULT NULL COMMENT '调度机构性质，网\n调、省调、地调、\n县调\n',
        private Integer gridVoltageLevel;//;//;//int(10) DEFAULT NULL COMMENT '并网电压等级',
        private short isEnabled;//tinyint(1) DEFAULT NULL COMMENT '是否启用,0:未启用，1：启用',
        private Integer createUserId;//bigint(20) DEFAULT NULL COMMENT '创建用户的id',
        private LocalDateTime createTime;// datetime DEFAULT NULL COMMENT '创建时间',
        private Integer sort;//int(8) NOT NULL DEFAULT '0',
        private String cooperationCom;//varchar(60) DEFAULT NULL,
        private BigDecimal desCapa;//decimal(10,0) DEFAULT NULL COMMENT '设计容量',
        private BigDecimal desHour;// decimal(10,0) DEFAULT NULL COMMENT '年利用小时数',
        private BigDecimal sqare;// decimal(10,4) DEFAULT NULL COMMENT '占地面积',
        private String phone;//varchar(11) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '联系电话',


    }

    //
    private StationInfo stationInfo;
    private StationSpeedAttr stationSpeedAttr;
    private StationOther stationOther;
    private StationGrid stationGrid;
    private StationClassify stationClassify;
    private StationCollection stationCollection;

    @Data
    public static class StationSpeedAttr implements Serializable {
        private static final long serialVersionUID = 1L;
        private Long stationId;

        /**
         * 海拔
         */
        private BigDecimal altitude;

        /**
         * 可研报告轮毂高度年平均风速
         */
        private BigDecimal speedAvg;
        /**
         * 可研报告轮毂高度年平均功率密度
         */
        private BigDecimal speedPower;
    }


    @Data
    public static class StationOther implements Serializable {

        private static final long serialVersionUID = 1L;

        /**
         * 电站id
         */
        private Long stationId;

        /**
         * 有功控制
         */
        private Boolean hasContro;

        /**
         * 无功控制能力
         * 无功控制能力
         * 无功控制能力
         * 无功控制能力
         * 无功控制能力
         */
        private Boolean noHasContro;

        /**
         * 监控系统个数
         */
        private Integer mSysCount;

        /**
         * lvrt低压穿越能力
         */
        private Boolean lvrt;


    }


    @Data
    @EqualsAndHashCode(callSuper = false)
    @Accessors(chain = true)
    public static class StationGrid implements Serializable {

        private static final long serialVersionUID = 1L;

        /**
         * 电站id
         */
        private Long stationId;

        /**
         * 通过并网测验
         */
        private Boolean gridDetection;

        /**
         * 调度机构名称
         */
        private String dispatchingAgency;

        /**
         * 调度机构性质等，网调，省调等
         */
        private Integer dispatchingProperty;

        /**
         * 并网电站名称
         */
        private String gridStation;

        /**
         * 首次并网时间
         */
        private LocalDateTime gridTime;

        /**
         * 全部并网时间
         */
        private LocalDateTime fullGridTime;

        /**
         * 并网电压等级id
         */
        private Integer gridLevelId;

        /**
         * 发电单元个数
         */
        private Integer powerUnit;
    }

    @Data
    public class StationClassify implements Serializable {

        private static final long serialVersionUID = 1L;

        private Long stationId;

        /**
         * 电子所属类型，集中式，分布式等
         */
        private Integer stationTypeId;

        /**
         * 电站所属类型如 自用，合资等
         */
        private Integer stationOwerId;

        /**
         * 安装方式id
         */
        private Integer stationBulidId;

        /**
         * 余量上网或者全量上网等
         */
        private Integer stationInetId;

        /**
         * 新的分类id
         */
        private Integer stationNewId;


    }

    @Data
    @EqualsAndHashCode(callSuper = false)
    @Accessors(chain = true)
    public class StationCollection implements Serializable {

        private static final long serialVersionUID = 1L;

        private Integer collectionId;

        private Long stationId;
    }

}
